// 表示引入了utils下的request.js文件
import request from '@/utils/request'

export default {

  // 分页条件查询订单信息
  getPageList(current, limit, search) {
    return request({
      url: `/orderservice/Torder/getPageList/` + current + `/` + limit,
      method: 'post',
      data: search
    })
  },
  // 根据订单id删除订单信息
  deleteOrder(orderId) {
    return request({
      url: `/orderservice/Torder/deleteOrder/` + orderId ,
      method: 'get',
    })
  },
  // 根据订单id获取订单信息
  getOrderById(orderId){
    return request({
      url: `/orderservice/Torder/getOrderById/` + orderId ,
      method: 'get',
    })
  },
  // 查询所有的课程信息
  selectCourseInfo(){
    return request({
      url: `/eduservice/course/getCourseInfoList/`,
      method: 'get',
    })
  },
  // 根据订单id和订单实体类更新订单信息
  updateOrder(orderId,orderEntity){
    return request({
      url: `/orderservice/Torder/updateOrder/` + orderId ,
      method: 'post',
      data: orderEntity
    })
  }
}
